home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbdb / dispdbin.frm < prev    next >
Text File  |  1995-09-06  |  5KB  |  183 lines

  1. VERSION 2.00
  2. Begin Form DispDBInfo 
  3.    BorderStyle     =   3  'Fixed Double
  4.    ClientHeight    =   3585
  5.    ClientLeft      =   2850
  6.    ClientTop       =   1935
  7.    ClientWidth     =   3480
  8.    ControlBox      =   0   'False
  9.    Height          =   3990
  10.    Left            =   2790
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3585
  16.    ScaleWidth      =   3480
  17.    Top             =   1590
  18.    Width           =   3600
  19.    Begin CommandButton Command1 
  20.       Caption         =   "OK"
  21.       Height          =   372
  22.       Left            =   1200
  23.       TabIndex        =   0
  24.       Top             =   3120
  25.       Width           =   1092
  26.    End
  27.    Begin TextBox Text1 
  28.       BackColor       =   &H00C0C0C0&
  29.       Enabled         =   0   'False
  30.       Height          =   612
  31.       Left            =   -120
  32.       TabIndex        =   13
  33.       Top             =   3000
  34.       Width           =   3612
  35.    End
  36.    Begin TextBox DBF_Type 
  37.       Height          =   372
  38.       Left            =   1560
  39.       TabIndex        =   12
  40.       Top             =   2280
  41.       Width           =   1092
  42.    End
  43.    Begin TextBox Memo_Ptr 
  44.       Height          =   372
  45.       Left            =   1560
  46.       TabIndex        =   11
  47.       Top             =   1920
  48.       Width           =   1092
  49.    End
  50.    Begin TextBox Record_Size 
  51.       Height          =   372
  52.       Left            =   1560
  53.       TabIndex        =   10
  54.       Top             =   1560
  55.       Width           =   1092
  56.    End
  57.    Begin TextBox Last_Update 
  58.       Height          =   372
  59.       Left            =   1560
  60.       TabIndex        =   9
  61.       Top             =   1200
  62.       Width           =   1092
  63.    End
  64.    Begin TextBox Field_Count 
  65.       Height          =   372
  66.       Left            =   1560
  67.       TabIndex        =   7
  68.       Top             =   840
  69.       Width           =   1092
  70.    End
  71.    Begin TextBox Record_count 
  72.       Height          =   372
  73.       Left            =   1560
  74.       TabIndex        =   8
  75.       Top             =   480
  76.       Width           =   1092
  77.    End
  78.    Begin Label Label7 
  79.       Alignment       =   1  'Right Justify
  80.       Caption         =   "DBF type"
  81.       Height          =   252
  82.       Left            =   240
  83.       TabIndex        =   4
  84.       Top             =   2400
  85.       Width           =   1212
  86.    End
  87.    Begin Label Label6 
  88.       Alignment       =   1  'Right Justify
  89.       Caption         =   "Memo file"
  90.       Height          =   252
  91.       Left            =   240
  92.       TabIndex        =   6
  93.       Top             =   2040
  94.       Width           =   1212
  95.    End
  96.    Begin Label Label5 
  97.       Alignment       =   1  'Right Justify
  98.       Caption         =   "Record size"
  99.       Height          =   252
  100.       Left            =   240
  101.       TabIndex        =   5
  102.       Top             =   1680
  103.       Width           =   1212
  104.    End
  105.    Begin Label Label3 
  106.       Alignment       =   1  'Right Justify
  107.       Caption         =   "Last update"
  108.       Height          =   252
  109.       Left            =   240
  110.       TabIndex        =   3
  111.       Top             =   1320
  112.       Width           =   1212
  113.    End
  114.    Begin Label Label2 
  115.       Alignment       =   1  'Right Justify
  116.       Caption         =   "Fields"
  117.       Height          =   252
  118.       Left            =   240
  119.       TabIndex        =   2
  120.       Top             =   960
  121.       Width           =   1212
  122.    End
  123.    Begin Label label1 
  124.       Alignment       =   1  'Right Justify
  125.       Caption         =   "Records"
  126.       Height          =   252
  127.       Left            =   240
  128.       TabIndex        =   1
  129.       Top             =   600
  130.       Width           =   1212
  131.    End
  132.    Begin Label DatabaseName 
  133.       Alignment       =   2  'Center
  134.       Caption         =   "dbf name"
  135.       Height          =   252
  136.       Left            =   0
  137.       TabIndex        =   14
  138.       Top             =   120
  139.       Width           =   3492
  140.    End
  141. End
  142. DefInt A-Z
  143.  
  144. Sub Command1_Click ()
  145.     Unload DispDBInfo
  146. End Sub
  147.  
  148. Sub Form_Load ()
  149.     
  150.     '
  151.     'displays the database structure of a database
  152.     '
  153.     
  154.     Screen.MousePointer = 11     'change mouse
  155.     Load DispDBInfo                     'load the form
  156.     LoadDisplay                         'load 0 DBF info into form
  157.     DispDBInfo.Show                     'show form
  158.     Screen.MousePointer = 0       'restore mouse
  159.     
  160. End Sub
  161.  
  162. Sub LoadDisplay ()
  163.     
  164.     '
  165.     'Loads the DBDisplay form with all data from
  166.     'header of database Handle.
  167.     '
  168.  
  169.     StatusDBF DBFHandle, FileName$, DBFType$, DBTPtr, NumRecs&, NumFlds, RecLen, UpDate$, Status
  170.     
  171.     DispDBInfo.Caption = "Database detail"
  172.     DispDBInfo.DatabaseName.Caption = FileName$
  173.     DispDBInfo.Record_Count.Text = LTrim$(Str$(NumRecs&))
  174.     DispDBInfo.Field_Count.Text = LTrim$(Str$(NumFlds))
  175.     DispDBInfo.Last_Update.Text = UpDate$
  176.     DispDBInfo.DBF_Type.Text = DBFType$
  177.     DispDBInfo.Record_Size.Text = LTrim$(Str$(RecLen))
  178.     If DBTPtr Then YN$ = "yes" Else YN$ = "no"
  179.     DispDBInfo.Memo_Ptr.Text = YN$
  180.     
  181. End Sub
  182.  
  183.